/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pkginterface;

/**
 *
 * @author sara
 */
public class Square {
    private int width;

    public Square(int width) {
        this.width = width;
    }
    public int getArea()
    {
        return width*width;
    }
    public int getPerimeter()
    {
        return 4*width;
    }
    public String toString()
    {
        return "Square{" + "width=" + width + '}'+ "\narea:"+this.getArea()+"\ncircum:"+this.getPerimeter() ;
    }
}
